fun sort(a : Int[], l : Int, r : Int) {
    if (r-l > 1) {
        val p = a[l];
        var i = l;
        var j = r - 1;
        while (i < j) {
            while (i<j && a[j]>=p) j=j-1;
            if (i<j) {
                a[i] = a[j];
                i=i+1;
            }

            while (i<j && a[i]<p) i=i+1;
            if (i<j) {
                a[j] = a[i];
                j=j-1;
            }
        }
        a[i] = p;
        sort(a, l, i);
        sort(a, i+1, r);
    }
}

fun main() : Int {
    var a : Int[10001];
    var n : Int;

    scanf("%d", n);
    for (var i=0; i<n; i=i+1) 
        scanf("%d", a[i]);

    sort(a, 0, n);

    for (var i=0; i<n; i=i+1)
        printf("%d\n", a[i]);
    return 0;
}